import { http } from '@/utils'

// 1.获取问题列表
export interface Response {
    category: Category[];
    code: number;
    data: Datum[];
    page: number;
    pageSize: number;
    totalCnt: number;
    [property: string]: any;
}

export interface Category {
    alt?: string;
    banner?: null;
    caption?: string;
    category?: number;
    category_name?: string;
    content?: null;
    default_image?: string;
    description?: null;
    display?: number;
    icon?: null;
    id?: number;
    is_deleted?: boolean;
    keywords?: null;
    level?: number;
    line_image?: null;
    recommended?: number;
    release_time?: string;
    router?: string;
    sequence?: null;
    title?: string;
    update_time?: string;
    views?: null;
    [property: string]: any;
}

export interface Datum {
    alt: string;
    author: null;
    banner: null;
    caption: null;
    category: number;
    category2: number;
    category3: number;
    content: string;
    default_image: string;
    description: string;
    display: number;
    id: number;
    is_deleted: null;
    keywords: string;
    recommended: null;
    related_pro: null | string;
    related_video: null | string;
    release_time: string;
    router: null;
    sequence: number;
    tags: null;
    title: string;
    update_time: string;
    views: number;
    [property: string]: any;
}

export type ReqParams = {
    page: string
    pageSize: string
  }
export function fetchSupportVideoAPI(params: ReqParams) {
    return http.request<Response>({
        url: '/videos/all/',
        params,
    })
}

